<?php
	class quangcaobs
	{
		public $MaQuangCao = 0;
		public $TenQuangCao = "";
		public $DiaChiQuangCao = "";
		public $HinhAnh = "";
		public $Rating = 0;
		
		public function Add()
		{
			$db = new quangcaodb();
			return $db->Add($this->TenQuangCao, $this->DiaChiQuangCao, $this->HinhAnh, $this->Rating);
		}
		
		public function Delete()
		{
			$db = new quangcaodb();
			return $db->Delete($this->MaQuangCao);
		}
		
		public function Update()
		{
			$db = new quangcaodb();
			return $db->Update($this->MaQuangCao, $this->TenQuangCao, $this->DiaChiQuangCao, $this->HinhAnh, $this->Rating);
		}
		
		public function GetList()
		{
			$db = new quangcaodb();
			return $db->GetList();
		}
		
		public function GetListSortByRating()
		{
			$db = new quangcaodb();
			return $db->GetListSortByRating();
		}
		
		public function GetListByID()
		{
			$db = new quangcaodb();
			return $db->GetListByID($this->MaQuangCao);
		}
	}
?>